package router

import (
	"fx_swift_ifcgate_agent/internal/controller"
	"fx_swift_ifcgate_agent/pkg/upload"
	"github.com/gin-gonic/gin"
)

var miniApiVer *gin.RouterGroup

func InitRouter(g *gin.Engine) {
	installController(g)
}

func installController(engine *gin.Engine) {
	miniApiVer = engine.Group("api/ifcgateAgent")

	miniApiVer.POST("register", controller.Register)
	miniApiVer.POST("login", controller.Login)
	miniApiVer.POST("forgetPassword", controller.ForgetPassword)

	miniApiVer.GET("sendMailCode", controller.SendMailCode)
	miniApiVer.GET("getCountryInfo", controller.GetCountryInfo)
	miniApiVer.GET("getCurrencyInfo", controller.GetCurrencyInfo)
	miniApiVer.GET("queryBusinessNature", controller.QueryBusinessNature)
	miniApiVer.GET("querySourceFund", controller.QuerySourceFund)
	miniApiVer.GET("queryPaymentPurpose", controller.QueryPaymentPurpose)
	miniApiVer.GET("queryTurnover", controller.QueryTurnover)
	miniApiVer.GET("queryTransaction", controller.QueryTransaction)
	miniApiVer.GET("emailIsExit", controller.EmailIsExit)
	miniApiVer.GET("getCompanyType", controller.GetCompanyType)
	miniApiVer.GET("getPurposeList", controller.GetPurposeList)

	miniApiVer.POST("uploaderToS3", upload.UploadToS3)
	miniApiVer.POST("uploader", upload.BatchUpload)

	AgentRouter()
	IndexRouter()
	TransferRouter()
	ExchangeRouter()
	userRouter()
	VAINfoRouter()
	InvitationRouter()
	CommissionRouter()
	FeeRouter()
}
